#!/bin/bash
gxml=/data/
gzd=/nfsdir/
fwd_ip=192.168.188.192
rpm -qa | grep nfs-utils
if [ $? -eq 0 ];then
        echo "nfs程序包正常"
else
        echo "请先下载rpm程序包"
  exit 0
fi
echo "正在安装nfs-utils请稍等"
yum -y install nfs-utils  > /dev/null 2>&1
if [ $? -eq 0 ];then
        echo "nfs-utils安装成功"

else
        echo "安装错误，请检查安装"
        exit 0
fi
mkdir -p $gxml
mkdir -p $gzd
mount -t nfs $fwd_ip:$gxml $gzd
echo "可以用df -h 查看"
# 如果挂载后想取消挂载直接umount
#如果取消不了fuser -m -k /mnt杀死进程
